package svc

import (
	"api/internal/config"
	"elm_srv/elmclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	ElmSrv elmclient.Elm
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		ElmSrv: elmclient.NewElm(zrpc.MustNewClient(c.ElmSrv)),
	}
}
